home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000308_nugulus@netscape.net_Fri Sep 26 12:10:04 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  59 lines

  1. Article: 14552 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!nntp1.tagonline.com!nycmny1-snf1.gtei.net!news.gtei.net!newsfeed.albacom.net!kleenex.wirehub.nl!news.completel.fr!ircam.fr!usenet-fr.net!teaser.fr!deine.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!newshosting.com!news-xfer1.atl.newshosting.com!diablo.voicenet.com!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail
  3. From: Jun Zhang <nugulus@netscape.net>
  4. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
  5. X-Accept-Language: en-us, en
  6. MIME-Version: 1.0
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: How to use fopen
  9. References: <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com> <bl1hjq$s8o$1@sesame.cc.columbia.edu>
  10. In-Reply-To: <bl1hjq$s8o$1@sesame.cc.columbia.edu>
  11. Content-Type: text/plain; charset=us-ascii; format=flowed
  12. Content-Transfer-Encoding: 7bit
  13. Lines: 35
  14. Message-ID: <S%Ycb.191$tx1.173384842@newssvr11.news.prodigy.com>
  15. NNTP-Posting-Host: 159.66.144.147
  16. X-Complaints-To: abuse@prodigy.net
  17. X-Trace: newssvr11.news.prodigy.com 1064590450 ST000 159.66.144.147 (Fri, 26 Sep 2003 11:34:10 EDT)
  18. NNTP-Posting-Date: Fri, 26 Sep 2003 11:34:10 EDT
  19. Organization: SBC http://yahoo.sbc.com
  20. X-UserInfo1: OXZYS]SGYJSUCFD[LZKJOPHAWB\^PBQLGPQRJWQHBATBTSUBYFWEAE[YJLYPIWKHTFCMZKVMB^[Z^DOBRVVMOSPFHNSYXVDIE@X\BUC@GTSX@DL^GKFFHQCCE\G[JJBMYDYIJCZM@AY]GNGPJD]YNNW\GSX^GSCKHA[]@CCB\[@LATPD\L@J\\PF]VR[QPJN
  21. Date: Fri, 26 Sep 2003 15:34:10 GMT
  22. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14552
  23.  
  24. fopen /read \%c inputfile
  25. fread \%c a
  26.  
  27. so that each element of the array will be a field of a line in 
  28. inputfile. Suppose a line in the inputfile is like,
  29.     5122785633  root  rootpass
  30. I'll have a[2] with the value 'rootpass'.
  31. Please correct me.
  32.  
  33.  
  34. Jun
  35.  
  36. Frank da Cruz wrote:
  37. > In article <NFXcb.181$vB7.165756109@newssvr11.news.prodigy.com>,
  38. > Jun Zhang  <nugulus@netscape.net> wrote:
  39. > : What I have in mind is to say,
  40. > : fopen /read \%c inputfile arrayname
  41. > : and then start to access the array elements by,
  42. > : fread ...
  43. > : How can I exactly do this?
  44. > : (I was told the manual is shipped, and take 1 to 2 weeks to deliver.)
  45. > : 
  46. > You have to be more specific.  Do you want each line of the file to
  47. > be assigned to an array element?  Then:
  48. >   fread /line \%c \&a[\%i]
  49. > or whatever.  You don't have to wait for the manual to read about arrays
  50. > and file i/o.  See:
  51. >   http://www.columbia.edu/kermit/ckermit70.html#x7.10  (about arrays)
  52. >   http://www.columbia.edu/kermit/ckermit70.html#x1.22  (about file i/o)
  53. > - Frank
  54.  
  55.